package com.ce.pms.occupation.model;

// Generated 2008-12-24 13:41:51 by Hibernate Tools 3.2.0.b9

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称:入伙验房登记 关联数据表:OM_INSPECTION_REQUISITION
 *
 * @author yandawei
 * @CreateDate:2008-12-24
 */
@Entity
@Table(name = "OM_INSPECTION_REQUISITION")
public class InspecteRequisiteDO implements IDomainObject {

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue
	@Column(name = "INSPECTION_REQUISITION_ID", unique = true, nullable = false)
	private Long keyword;

	/**
	 * 身份验证
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "IDENTITY_VALIDATE_ID", nullable = false)
	private IdentityValidateDO identityValidate;

	/**
	 * 验收日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "CHECK_DATE", nullable = false, length = 19)
	private Date checkDate;

	/**
	 * 验收人
	 */
	@Column(name = "CHECK_MAN", nullable = false, length = 50)
	private String checkMan;

	/**
	 * 验房员
	 */
	@Column(name = "PROVE_MAN", nullable = false, length = 50)
	private String proveMan;

	/**
	 * 验收结果 1 ：通过 0：不通过
	 */
	@Column(name = "CHECK_RESULT", nullable = false, length = 1)
	private String checkResult;

	/**
	 * 整改项目
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "inspectionRequisition")
	@org.hibernate.annotations.Cascade(value = { org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Set<PerfectItemRequisitionDO> perfectItemRequisitions = new HashSet<PerfectItemRequisitionDO>();

	/**
	 * 走表底数
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "inspectionRequisition")
	@org.hibernate.annotations.Cascade(value = { org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Set<MeterCardinalNumberDO> meterCardinalNumbers = new HashSet<MeterCardinalNumberDO>();

	public InspecteRequisiteDO() {
	}

	public InspecteRequisiteDO(Long keyword) {
		this.keyword = keyword;
	}

	public IdentityValidateDO getIdentityValidate() {
		return identityValidate;
	}

	public void setIdentityValidate(IdentityValidateDO identityValidate) {
		this.identityValidate = identityValidate;
	}

	public Date getCheckDate() {
		return this.checkDate;
	}

	public void setCheckDate(Date checkDate) {
		this.checkDate = checkDate;
	}

	public String getCheckMan() {
		return this.checkMan;
	}

	public void setCheckMan(String checkMan) {
		this.checkMan = checkMan;
	}

	public String getProveMan() {
		return this.proveMan;
	}

	public void setProveMan(String proveMan) {
		this.proveMan = proveMan;
	}

	public String getCheckResult() {
		return this.checkResult;
	}

	public void setCheckResult(String checkResult) {
		this.checkResult = checkResult;
	}

	public Long getKeyword() {
		return keyword;
	}

	public void setKeyword(Long keyword) {
		this.keyword = keyword;
	}

	public Set<MeterCardinalNumberDO> getMeterCardinalNumbers() {
		return meterCardinalNumbers;
	}

	public void setMeterCardinalNumbers(
			Set<MeterCardinalNumberDO> meterCardinalNumbers) {
		this.meterCardinalNumbers = meterCardinalNumbers;
	}

	public Set<PerfectItemRequisitionDO> getPerfectItemRequisitions() {
		return perfectItemRequisitions;
	}

	public void setPerfectItemRequisitions(
			Set<PerfectItemRequisitionDO> perfectItemRequisitions) {
		this.perfectItemRequisitions = perfectItemRequisitions;
	}

}
